package com.sinry.common.core.interceptors;

import com.sinry.common.core.annotations.ResponseHandler;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author linxinlei
 * @project sinry-cloud
 * @description 响应拦截器
 * @date 2022/5/22
 **/
@Slf4j
@Component
public class ResponseInterceptor implements HandlerInterceptor {

    @Override
    public boolean preHandle(@NonNull HttpServletRequest request,
                             @NonNull HttpServletResponse response,
                             @NonNull Object handler) {
        Class<?> aClass = handler.getClass();
        ResponseHandler responseHandler = aClass.getAnnotation(ResponseHandler.class);



        return true;
    }
}
